﻿<!--#include file="../lib/base.asp"-->
<!--#include file="../theme.asp"-->
<%
''' SDCMS 人气
''' ==================================================================
''' 版权所有 http://www.sdcms.cn
''' ------------------------------------------------------------------
''' 这不是一个自由软件！您只能在不用于商业目的的前提下对程序代码进行修改和使用；
''' 未经授权不允许对程序代码以任何形式任何目的的再发布。
''' ==================================================================
''' 编写: IT平民
''' 修改：IT平民 in 2014.07

	dim id:id=sdcms.getint(sdcms.fpost("id",0),0)
	if id=0 then
		sdcms.echo "0:0"
		sdcms.die
	end if
	if sdcms.loadcookie("content_"&id)<>"" then
		'sdcms.echo sdcms.loadcookie("content_"&id)
		'sdcms.die
	end if
	dim data:data=sdcms.db.dbload(1,"hits,comments","sd_content","id="&id&"","")
	if ubound(data)<0 then
		sdcms.echo "0:0"
	else
		sdcms.db.dbupdate "sd_content","id="&id&"",array(array("hits",data(0,0)+1,0,0))
		sdcms.echo data(0,0)+1&":"&data(1,0)
		sdcms.setcookie "content_"&id,data(0,0)+1&":"&data(1,0)
	end if
	sdcms.db.dbclose
%>